package com.yyxxlu.aimodel.controller;

import lombok.RequiredArgsConstructor;
import org.springframework.ai.chat.client.ChatClient;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RequiredArgsConstructor
@RestController
@RequestMapping("/VincentMan")
public class VincentManController {

  private final ChatClient ChatClient;

  @RequestMapping("/chat")
  public String chat(String question) {
    //   http://localhost:8081/VincentMan/chat?question=
    return ChatClient.prompt(question).call().content();
  }
}
